package com.quanyan.user.serviceFacade.impl;

import com.quanyan.user.mapper.UserMedalExtendMapper;
import com.quanyan.user.response.RespOpenUserMedal;
import com.quanyan.user.serviceFacade.UserMedalServiceFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zhang on 16/7/19.
 */
@Service("userMedalServiceFacade")
public class UserMedalServiceFacadeImpl implements UserMedalServiceFacade {

    @Autowired
    private UserMedalExtendMapper userMedalExtendMapper;

    /**
     * 获取用户勋章列表
     * @param
     * @return
     */
    @Override
    public List<RespOpenUserMedal> getUserMedalList(int categoryId,int uid,int medalNum) {
        Map map = new HashMap();
        map.put("categoryId",categoryId);
        map.put("uid",uid);
        map.put("medalNum",medalNum);
        List<RespOpenUserMedal> respOpenUserMedalList;
        respOpenUserMedalList = this.userMedalExtendMapper.getOpenUserMedal(map);
        return respOpenUserMedalList;
    }
}
